{extend name="layout/layout" /}
{block name="content"}
<link href="__STATIC__/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<style>
    .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td{
        line-height: 50px;
        text-align: center;
    }
</style>

<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="portlet light">
            <div class="box-header">
                <div class="row">
                    <div class="col-md-10">
                        督办业务：{if $info.typeId == 1}【内部工作】{else/}【信访工作】{/if}{$info.title}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;创建人：{$info.p_name}<br/>完成时间：{$info.complete_time}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;紧急程度：{if $info.urgency_degree==1}一般{elseif $info.urgency_degree==2}紧急{else/}加急{/if}<br/>
                        工作要求：{$info.content}
                    </div>
                    <div class="col-md-2">
                        <div class="pull-right">
                            {if $info.schedule==3}
                            <button class="btn blue btn-circle addMember-btn"><i class="fa fa-plus"></i> 发布评价</button>
                            {else/}
                            <button type="button" class="btn btn-success">督办进行中</button>
                            {/if}
                        </div>
                    </div>
                </div>
            </div>
            <div class="portlet-body">
                <form class="js-ajax-form" method="post">
                    <div class="">
                        <table id="data-table" class="table table-bordered table-hover dataTable">
                            <thead>
                            <th>评价人</th>
                            <th>评价时间</th>
                            <th>评价结果</th>
                            <th>评语</th>
                            <th>操作</th>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr role="row" class="odd">
                                <td>{$vo.p_name}</td>
                                <td>{$vo.createDate}</td>
                                <td>{if $vo.estimate==1}满意{elseif $vo.estimate==2 /}基本满意{else/}不满意{/if}</td>
                                <td class="sorting_1">{$vo.e_content}</td>
                                <td>
                                    {if $vo.estimate!=1}
                                    <button type="button" id="editEvaluate" data-sid="{$info.id}" data-userid="{$vo.user_id}" data-editid="{$vo.id}" data-content="{$vo.e_content}" data-estimate="{$vo.estimate}" class="btn btn-success">修改</button>
                                    {/if}
                                </td>

                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 详情 模态框 -->
<div class="modal fade" id="view-modal" data-backdrop="static" data-keyboard="false" >
    <div class="modal-dialog" style="width:800px; height: 520px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">x</button>
                <h4 class="modal-title">发布评价</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="portlet light" style="margin-bottom: 0;">
                            <div class="portlet-body">
                                <form method="post" class="form-horizontal" name="ajaxForm">
                                    <div class="">
                                        <div class="row">
                                            <div class="col-md-9">
                                                <div class="form-group">
                                                    <label class="control-label col-md-3">
                                                        满意度
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-9">
                                                        <div class="form-inline">
                                                            <select class="form-control" name="estimate">
                                                                <option value="1">满意</option>
                                                                <option value="2">基本满意</option>
                                                                <option value="3">不满意</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-9">
                                                <div class="form-group">
                                                    <label class="control-label col-md-3">
                                                        评语
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-9">
                                                        <textarea class="form-control" cols="80" rows="5" name="content" placeholder="请输入完成内容"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <input type="hidden" name="supervisionId" value="{$info.id}">
                                    <input type="hidden" name="userId" value="{$loginId}">
                                    <div class="modal-footer">
                                        <button type="button" class="btn blue saveSpeed-btn"> 确定 </button>
                                        <button type="button" class="btn default" data-dismiss="modal"> 关闭 </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 详情 模态框 -->
<div class="modal fade" id="view-modal01" data-backdrop="static" data-keyboard="false" >
    <div class="modal-dialog" style="width:800px; height: 520px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">x</button>
                <h4 class="modal-title">修改评价</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="portlet light" style="margin-bottom: 0;">
                            <div class="portlet-body">
                                <form method="post" class="form-horizontal" name="ajaxForm">
                                    <div class="">
                                        <div class="row">
                                            <div class="col-md-9">
                                                <div class="form-group">
                                                    <label class="control-label col-md-3">
                                                        满意度
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-9">
                                                        <div class="form-inline">
                                                            <select class="form-control" name="estimate">
                                                                <option value="1" id="estimate01">满意</option>
                                                                <option value="2" id="estimate02">基本满意</option>
                                                                <option value="3" id="estimate03">不满意</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-9">
                                                <div class="form-group">
                                                    <label class="control-label col-md-3">
                                                        评语
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-9">
                                                        <textarea class="form-control" cols="80" id="content" rows="5" name="content" placeholder="请输入完成内容"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <input type="hidden" name="estimateId" value="">
                                    <input type="hidden" name="sid" value="">
                                    <input type="hidden" name="user_id" value="">
                                    <div class="modal-footer">
                                        <button type="button" class="btn blue editEvaluate-btn"> 确定 </button>
                                        <button type="button" class="btn default" data-dismiss="modal"> 关闭 </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<input type="hidden" class="datalist_url" value="{:url('admin/Supervision/handle')}">
<input type="hidden" class="edit_url" value="{:url('admin/Supervision/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/Supervision/delete')}">
<input type="hidden" class="addEvaluate_url" value="{:url('admin/Supervision/evaluatePost')}">
<input type="hidden" class="editEvaluate_url" value="{:url('admin/Supervision/editevaluate')}">

{/block}

{block name="pagescript"}
<script src="__STATIC__/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/evaluate.js?v={:time()}" type="text/javascript"></script>
{/block}